home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11109 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: tank.news.pipex.net!pipex!warwick!kinguni!usenet
  2. From: Paul Giaccone <cs_j675>
  3. Newsgroups: comp.lang.c++
  4. Subject: Relative times taken by mathematical operations
  5. Date: 12 Mar 1996 16:29:28 GMT
  6. Organization: Kingston University, Kingston-upon-Thames
  7. Message-ID: <4i48p8$prb@mercury.kingston.ac.uk>
  8. NNTP-Posting-Host: vulture.dcs.king.ac.uk
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.12 (X11; I; SunOS 4.1.3 sun4m)
  13. X-URL: news:comp.lang.c++
  14.  
  15. I have several accumulated several algorithms for solving a simple geometric
  16. problem that is part of a much larger piece of work.  I would like to calculate
  17. which is the likely to be the fastest by counting the elementary mathematical
  18. operations that make them up, these being the four arithmetical operations and
  19. the square root and inverse tangent operations.
  20.  
  21. I don't need to know exact numbers of clock cycles for each of these but I
  22. would like to know the time ratios between them (eg addition : multiplication :
  23. square root : arctan = 1 : 4 : 10 : 25).
  24.  
  25. If it helps, I'm using g++ running under Unix.
  26.  
  27. Thanks for any help (I would prefer e-mail replies).
  28.  
  29. Paul Giaccone
  30. k941319@kingston.ac.uk
  31. Vision Group
  32. Kingston University
  33.  
  34.